import request from '@/config/axios'

export interface CustomerFollowUpVO {
  id: number
  customerId: number
  customerName: string
  followContent: string
  nextFollowTime: Date
  followUserId: number
  followUserName: string
  createTime: Date
}

export interface CustomerFollowUpPageReqVO extends PageParam {
  customerId?: number
  followContent?: string
  followUserId?: number
  createTime?: Date[]
}

// 查询客户跟进记录列表
export const getCustomerFollowUpPage = (params: CustomerFollowUpPageReqVO) => {
  return request.get({ url: '/oa/customer-follow-up/page', params })
}

// 查询客户跟进记录详情
export const getCustomerFollowUp = (id: number) => {
  return request.get({ url: '/oa/customer-follow-up/get?id=' + id })
}

// 新增客户跟进记录
export const createCustomerFollowUp = (data: CustomerFollowUpVO) => {
  return request.post({ url: '/oa/customer-follow-up/create', data })
}

// 修改客户跟进记录
export const updateCustomerFollowUp = (data: CustomerFollowUpVO) => {
  return request.put({ url: '/oa/customer-follow-up/update', data })
}

// 删除客户跟进记录
export const deleteCustomerFollowUp = (id: number) => {
  return request.delete({ url: '/oa/customer-follow-up/delete?id=' + id })
} 